wget https://download.oracle.com/java/21/archive/jdk-21.0.6_linux-x64_bin.tar.gz
mkdir -p ~/JDK21
tar -zxvf jdk-21.0.6_linux-x64_bin.tar.gz -C ~/JDK21
jdk_dir=$(ls ~/JDK21 | grep jdk)



echo ' JAVA_HOME=~/JDK21/'"$jdk_dir" >> ~/.bash_profile
echo ' PATH=$PATH:$JAVA_HOME/bin' >> ~/.bash_profile
echo 'PATH=$PATH:$JAVA_HOME/jre/bin' >> ~/.bash_profile
source ~/.bash_profile
java -version
